<template>
  <view class="setup-page">
    <view class="menu-item" @click="openRoutePath('pages/setup/bind_mobile')">
      <view class="name">
        <text class="text">绑定手机号</text>
      </view>
      <view class="flex-right">
        <template v-if="!userInfo.isBindMobile">
          <image src="/static/image/icon-menu-info.png" class="info" />
          <text class="text">未设置</text>
        </template>
        <image src="/static/image/icon-arrow-right.png" class="icon"></image>
      </view>
    </view>
    <view class="menu-item u-border-top" @click="openRoutePath('pages/setup/withdrawal_password')">
      <view class="name">
        <text class="text">提现密码</text>
      </view>
      <view class="flex-right">
        <template v-if="!userInfo.isSetPass">
          <image src="/static/image/icon-menu-info.png" class="info" />
          <text class="text">未设置</text>
        </template>
        <image src="/static/image/icon-arrow-right.png" class="icon"></image>
      </view>
    </view>
  </view>
</template>
<script setup>
import { ref, reactive, computed } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { globalStore } from "@/store";
const gStore = globalStore();
let userInfo = ref({});
userInfo = computed(() => {
  return gStore.userInfo;
});
onLoad((options) => {});
const openRoutePath = (path) => {
  uni.$u.route({
    url: path,
  });
};
</script>
<style lang="scss">
page {
  background-color: #f6f6f8;
}
.menu-item {
  display: flex;
  align-items: center;
  background-color: #fff;
  padding: 24rpx 20rpx;
  .name {
    flex: 1;
    padding-left: 16rpx;
    .text {
      font-family: PingFang SC;
      font-size: 32rpx;
    }
  }
  .flex-right {
    display: flex;
    align-items: center;
    .info,
    .icon {
      width: 32rpx;
      height: 32rpx;
    }
    .text {
      font-size: 28rpx;
      font-style: normal;
      font-weight: 400;
      color: #9eb0c5;
      padding: 0 24rpx 0 8rpx;
    }
  }
}
</style>
